<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:fo="http://www.w3.org/1999/XSL/Format" 
  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
  xmlns:fn="http://www.w3.org/2005/xpath-functions">
  <xsl:template match="/">
    <html>
      <head>
        <title>
          Text Messages
        </title>
        <link rel="stylesheet" type="text/css" href="include/ndara.css" />
      </head>
      <body>
        <div class="mainBorder">
          <table width="300px" cellpadding="0px" cellspacing="0px" border="0" style="background-color:white;">
            <tr>
              <td colspan="2">
                <div class="titleBar">Text Messages</div>
              </td>
            </tr>
            <xsl:for-each select="summary/contact">
              <!-- BEGIN Contact Summary -->
              <tr>
                <td>
                  <table width="300px" style="background-color:white;">
                    <tr>
                      <td class="previewName">
                        <span>
                          <xsl:value-of select="@address"/>
                        </span>
                      </td>
                      <td class="previewDate">
                        <xsl:value-of select="@dateStamp"/>
                      </td>
                      <td rowspan="2" width="8px">
                        <a href="{@address}.xml">
                          <img src="include/arrow.jpg" border="0"/>
                        </a>
                      </td>
                    </tr>
                    <tr>
                      <td colspan="2"  class="previewSMS">
                        <a href="{@address}.xml">
                          <xsl:value-of select="."/>
                        </a>
                      </td>
                    </tr>
                  </table>
                  <hr/>
                </td>
              </tr>
              <!-- END Contact Summary -->
            </xsl:for-each>
          </table>
        </div>
		<br/><br/>
        <span style="font-size:8px;">
          Generated with:
          <a href="http://code.google.com/p/ndara/" target="_blank"> Ndara iSMS Backup</a>
        </span>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>
